package com.ai.dao.mapper;

import com.ai.pojo.BfmUser;
import com.ai.pojo.BfmUser2;
import com.ai.pojo.TngpUserRef;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Mapper
public interface BfmUserMapper {

    /**
     * 根据人主编码查询用户ID
     * @param user
     * @return 返回用户ID
     */
    BfmUser selectUserByMainCode(BfmUser user);

    /**
     * 通过序列获取UserID
     * @return
     */
    Long getUserIdBySeq();

    /**
     * 新增用户
     * @param user
     * @return
     */
    int addAccount(BfmUser user);

    /**
     * 编辑用户
     * @param user
     * @return
     */
    int modifyAccount(BfmUser user);

    /**
     * 删除用户
     * @param user
     * @return
     */
    int deleteAccount(BfmUser user);

    int saveUserHis(BfmUser user);

    /**
     * 新增用户关联信息
     * @param userRef
     * @return
     */
    int addUserRef(TngpUserRef userRef);

    /**
     * 修改用户关联信息（人主修改组织信息）
     * @param userRef
     * @return
     */
    int modifyUserRef(TngpUserRef userRef);

    /**
     * 同步人员信息定时任务
     * @param
     * @return
     */
    String getCron(int i);

    /**
     * 查询用户编码
     * @param
     * @return
     */
    ArrayList<Map<String, String>> selectUserCode();

    void updateState(BfmUser2 bfmUser2);

    List<Map<String, Object>> queryUserAndRolesRel();

    List<Map<String, Object>> querySystemRoles();

    List<Map<String, Object>> querySystemUser();

    List<Map<String, Object>> queryRolesById(String sysUserId);

    List<Map<String, Object>> queryLoginLogs();

    List<Map<String, Object>> getOperationLogs();

    List<Map<String, Object>> getOperationLogs2();

    List<Map<String, Object>> getOperationLogs3();

    Map<String, Object> queryTransByAccountCode(String mainAccountCode);

    Map<String, Object> queryIsManager(BfmUser bfmUser);

    int insertStaffTrans(BfmUser bfmUser);

    List<Map<String, Object>> getOperationLogs4();

}
